#ifndef MYSQLDBHELP_H
#define MYSQLDBHELP_H

#include <QString>
#include <QDate>
#include <QMap>
#include <QObject>
#include <QtSql/QSqlQuery>
//#include "globalData.h"

namespace MyDbClass
{
    class MySqlDbHelp : public QObject
    {
        Q_OBJECT
    public:
        MySqlDbHelp();
        ~MySqlDbHelp();

        static MySqlDbHelp* getInstance();
        bool excuteSql(QString sql, bool isNet = false);
        QSqlQuery getDataList(QString strSql, bool isNet = false);
        QSqlQuery getDataList(QString strSql, int& count);
        void closeDb();

    private:
        static MySqlDbHelp* dbSelf;
        QSqlDatabase db;
        bool isOpen;

    };
}

#endif